package hcn.protocol.brandnew.dengji.bingli;

import lombok.Data;
import javax.xml.bind.annotation.*;
import java.util.List;
import hcn.protocol.brandnew.BaseRequest;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import ctd.util.xml.jaxb.DateTimeAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;


/**
 * 病历质控整改信息查询-响应消息(成功) - ODS_02100020_SUC
 *
 * @author enjoyLife
 */
@Data
@XmlRootElement(name = "Data")
@XmlAccessorType(XmlAccessType.FIELD)
public class GetMedicalRecordRectificationResponse {

    /**
     * 整改信息
     */
    @XmlElement(name = "RequestList")
    private RequestList requestList;

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class RectificationItemList {

        /**
         * 整改项目名称
         */
        @XmlElement(name = "RectificationItemName")
        private String rectificationItemName;
        /**
         * 整改项目备注
         */
        @XmlElement(name = "RectificationItemRemark")
        private String rectificationItemRemark;
    }

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class RectificationList {

        /**
         * 截止时间
         */
        @XmlElement(name = "EndTime")
        @XmlJavaTypeAdapter(DateTimeAdapter.class)
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        private Date endTime;
        /**
         * 病历名称
         */
        @XmlElement(name = "MedicalRecordName")
        private String medicalRecordName;
        /**
         * 病历编号
         */
        @XmlElement(name = "MedicalRecordId")
        private String medicalRecordId;
        /**
         * 通知时间
         */
        @XmlElement(name = "NoticeDateTime")
        @XmlJavaTypeAdapter(DateTimeAdapter.class)
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        private Date noticeDateTime;
        /**
         * 整改项目列表
         */
        @XmlElementWrapper(name = "RectificationItemLists")
        @XmlElement(name = "RectificationItemList")
        private List<RectificationItemList> rectificationItemLists;
    }

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class RequestList {

        /**
         * 业务系统患者档案ID
         */
        @XmlElement(name = "SourcePatientId")
        private String sourcePatientId;
        /**
         * 住院号
         */
        @XmlElement(name = "HospizationId")
        private String hospizationId;
        /**
         * 就诊流水号
         */
        @XmlElement(name = "VisitId")
        private String visitId;
        /**
         * 整改信息列表List
         */
        @XmlElementWrapper(name = "RectificationLists")
        @XmlElement(name = "RectificationList")
        private List<RectificationList> rectificationLists;
    }

}
